/************************************************************************************
*
*                           HANGZHOU    DIANZI    UNIVERSITY
*
*                    The city of HangZhou in ZheJiang province of china
*
*                 (c) Copyright 2012, HANGZHOU DIANZI UNIVERSITY, HangZhou
*
*                                  All Rights Reserved
*
*   Filename    :    SSD1963.h
*
*   Programer(s):    xingzhan 
*
*   Description :    The Drives of TFT 
*
*   Modify Records:
*   Programer(s)           Data           Content           Version
*   xingzhan             2012/11/13     DataBase building      1.0  
*
************************************************************************************/ 

#ifndef __SSD1963_H__
#define __SSD1963_H__

#include "includes.h"  

#define     RA8875_WSIZE    480
#define     RA8875_HSIZE    272

#define     RA8875_REG	    *(__IO uint16_t *)((uint32_t)0x6C080000)
#define     RA8875_RAM	    *(__IO uint16_t *)((uint32_t)0x6C000000)

#define     RA8875_RESET_H()    (GPIOC -> ODR |=  (1 << 5))
#define     RA8875_RESET_L()    (GPIOC -> ODR &= ~(1 << 5))

void RA8875_Delaly1us(void);
void RA8875_Delaly1ms(void);
uint16_t RA8875_ReadID(void);
void RA8875_WriteReg(uint8_t _ucRegAddr, uint8_t _ucRegValue);
uint8_t RA8875_ReadReg(uint8_t _ucRegAddr);
void RA8875_SetCursor(uint16_t _usX, uint16_t _usY);
void RA8875_SetReadCursor(uint16_t _usX, uint16_t _usY);
void RA8875_SetDispWin(uint16_t _usX, uint16_t _usY, uint16_t _usEx, uint16_t _usEy);
void RA8875_SetFrontColor(uint16_t _usColor);
void RA8875_DispOn(void);
void RA8875_DispOff(void);
void RA8875_SetBackLight(uint8_t _bright);
void RA8875_Init(void);
void RA8875_Clear(void);
void RA8875_SetPoint(uint16_t _usX, uint16_t _usY, uint16_t _usColor);
uint16_t RA8875_GetPoint(uint16_t _usX, uint16_t _usY);
void RA8875_DrawLine(uint16_t _usX1 , uint16_t _usY1 , uint16_t _usX2 , uint16_t _usY2 , uint16_t _usColor);
void RA8875_FillRect(uint16_t _usX, uint16_t _usY, uint16_t _usEx, uint16_t _usEy, uint16_t _usColor);
void RA8875_TouchInit(void);
uint16_t RA8875_GetTouchXY(uint16_t *s_usTouchX, uint16_t *s_usTouchY);

#endif

